package com.study.blog.model.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

@ApiModel(value = "用户传入的文章属性")
@Data
public class ArticleDTO implements Serializable {

    /**
     * 标题
     */
    @ApiModelProperty(value = "标题", required = true, example = "看大父节点的了估计阿里健康个")
    @NotEmpty(message = "标题不能为空")
    private String title;


    /**
     * 内容
     */
    @ApiModelProperty(value = "内容", required = true, example = "开始开始所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所所高多少个了")
    @NotEmpty(message = "内容不能为空")
    private String content;


    /**
     * 作者
     */
    @ApiModelProperty(value = "作者", required = true, example = "1")
    @NotNull(message = "作者不能为空")
    private Long author;


    /**
     * 分类
     */
    @ApiModelProperty(value = "分类", required = true, example = "4")
    @NotNull(message = "分类不能为空")
    private Integer categoryId;
}
